class CreateUsers < ActiveRecord::Migration[5.0]
  def change
    create_table :users do |t|
      t.string :mobile, null: false, index: true, unique: true, comment: "车主手机号"
      t.string :password, comment: "用户密码"
      t.string :salt, comment: "用户密码生成加的盐"
      t.string :name, null: false, index: true, comment: "车主姓名"
      t.string :avatar, comment: "车主头像"
      t.string :gender, comment: "车主性别"
      t.string :idCard, comment: "车主身份证"
      t.string :address, comment: "车主地址"
      t.string :career, comment: "职业"
      t.string :company, comment: "公司"
      t.string :device_type, comment: "用户设备类型"
      t.string :device_token, comment: "用户设备token"
      t.string :status, default: 0, comment: "用户是否已经注册,默认未注册"
      t.timestamps
    end
  end
end
